/**
 * @file login.js
 * @author hj
 * @date 2016-11-10
 */
import Vue from 'vue';
import App from 'src/app';
import Router from 'vue-router';

/* 加载页面 */
import failPage from './vue/fail.vue';
import SuccuesPage from './vue/Succues.vue';
import firstPage from './vue/firstPage.vue';
import secondPage from './vue/secondPage.vue';

Vue.use(Router);

var router = new Router();
router.map({
  '/': {
    component: firstPage
  },
  '/second': {
    component: secondPage
  },
  '/Succues': {
    component: SuccuesPage
  },
  '/fail': {
    component: failPage
  }
});
router.beforeEach(function () {
  window.scrollTo(0, 0);
});
router.redirect({
  '*': '/'
});
router.start(App, 'html');
